-- file_w = io.open('/Users/tzp/Documents/private/cnm/Trial-7-Lan/resty/jsspider/save.out', "a")
-- local args = ngx.req.get_uri_args()
-- file_w:write(args.data)
-- file_w:write('\n')
-- file_w:close()
-- ngx.header.content_type = 'text/plain';
-- ngx.say("saved")


ngx.req.read_body()
file_w = io.open('/Users/tzp/Documents/private/cnm/Trial-7-Lan/resty/jsspider/save.out', "a")
local data = ngx.req.get_body_data()
file_w:write(data)
file_w:write('\n')
file_w:close()
ngx.header.content_type = 'text/plain';
ngx.say("saved")
